import axios from '../api';
// 暂时限制为 每页5个课程
export const  getCourselist = (id,size=5)=>{
    return axios.request({
        url: '/course',
        method: 'get',
        params:{
            id,size
        }
    })
}
export const  getCategorylist = (id,size)=>{
    return axios.request({
        url: '/categorylist',
        method: 'get',
        params:{
            id,size
        }
    })
}
export const  getCourseDetail= (id)=>{
    return axios.request({
        url: `/course/detail/${id}`,
        method: 'get'
    })
}
export const  collect= (id)=>{
    return axios.request({
        url: `/collect/${id}`,
        method: 'get'
    })
}
export const  delcollect= (id)=>{
    return axios.request({
        url: `/delcollect/${id}`,
        method: 'get'
    })
}
export const buyCourse = (id)=>{
    return axios.request({
        url: `/buycourse/${id}`,
        method: 'get'
    }) 
}
export const courseOrderList = (id)=>{
    return axios.request({
        url: `/buycourselist`,
        method: 'get'
    }) 
}